package main

import (
    "github.com/gin-gonic/gin"
    "search-bycode/handler"
    "search-bycode/job"
)

func main() {
    //tools.ShapeDict = tools.GetShapeTypeBy("\\\\172.16.16.16\\车间\\data\\type.xlsx")
    r := gin.Default()
    fileHandler := handler.FileHandler{}
    r.GET("/search", fileHandler.SearchFile)
    // r.GET("/upload", fileHandler.UploadCustom)
    r.POST("/upload", fileHandler.UploadCustom)
    r.GET("/upload-pic", fileHandler.UploadPic)

    go func() {
        job.GetExcelData()
    }()

    r.Run(":8081")
}
